package aiP.A3.FertigungKomponente.DataAccessLayer.Entity;

import aiP.A3.PersistenceService.iEntity;

import javax.persistence.Basic;
import javax.persistence.Entity;
import javax.persistence.Id;

/**
 * Created with IntelliJ IDEA.
 * User: Hero
 * Date: 22.05.14
 * Time: 13:51
 * To change this template use File | Settings | File Templates.
 */
@javax.persistence.Table(name = "AI_ARBEITSPLAN", schema = "AIP", catalog = "")
//@javax.persistence.Table(name = "AI_ARBEITSPLAN", schema = "HR", catalog = "")
@Entity
public class Arbeitsplan implements iEntity {
    private int arbeitsplanNr;
    private int vorgangsNr;

    @javax.persistence.Column(name = "ARBEITSPLAN_NR")
    @Id
    public int getArbeitsplanNr() {
        return arbeitsplanNr;
    }

    public void setArbeitsplanNr(int arbeitsplanNr) {
        this.arbeitsplanNr = arbeitsplanNr;
    }

    @javax.persistence.Column(name = "VORGANGS_NR")
    @Basic
    public int getVorgangsNr() {
        return vorgangsNr;
    }

    public void setVorgangsNr(int vorgangsNr) {
        this.vorgangsNr = vorgangsNr;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Arbeitsplan that = (Arbeitsplan) o;

        if (arbeitsplanNr != that.arbeitsplanNr) return false;
        if (vorgangsNr != that.vorgangsNr) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = arbeitsplanNr;
        result = 31 * result + vorgangsNr;
        return result;
    }
}
